<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>流浪书屋--会员登陆</title>
		<script type="text/javascript">
		function checkSubmit() {
		var flag = true;
		var mingObj = document.getElementById("ming");
		if (mingObj.value.length == 0) {
			showMsg("mingSpan", "用户名不能为空！");
			flag = false;
			mingObj.style.backgroundColor = "#CCCCCC";
		} else {
			showMsg("mingSpan", "");
			mingObj.style.backgroundColor = "#ffffff";
		}
		var passwordObj = document.getElementById("password");
		if (passwordObj.value.length == 0) {
			showMsg("passwordSpan", "密码不能为空！");
			flag = false;
			passwordObj.style.backgroundColor = "#CCCCCC";
		} else {
			showMsg("passwordSpan", "");
			passwordObj.style.backgroundColor = "#ffffff";
		}
		return flag;
	}

	function showMsg(id, msg) {
		var obj = document.getElementById(id);
		if (msg == "") {
			obj.innerHTML = "";
		} else {
			obj.innerHTML = "&nbsp;<img src='${CONTEXT_ROOT}/images/error.gif' align='middle'/>&nbsp;"
					+ msg;
		}
	}	
		</script>
	</head>
	<body topmargin="0">
		<center>
			<%@ include file="top.jsp"%>
			<div style="width:1004px">
				<form action="${CONTEXT_ROOT}/MemberLoginServlet" method="post"
					onsubmit="return checkSubmit()">
					<table border="1" cellspacing="0" cellpadding="0" bordercolor="#D4DD96">
						<tr>
							<th colspan="2" height="50px" valign="middle">
								<font face="华文行楷" size="5"><strong>会员登录</strong> </font>
							</th>
						</tr>
						<tr>
							<td colspan="2" align="center" height="30px">
								<font color="#ff0000">${message==null?"输入用户名、密码":message}</font>
							</td>
						</tr>
						<tr>
							<td align="right" height="40px" width="150x">
								用户名&nbsp;&nbsp;
							</td>
							<td align="left" width="450px">
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="text" name="userName" id="ming" size="28" />
								<span id="mingSpan"></span>
							</td>
						</tr>
						<tr>
							<td align="right" height="40px">
								密码&nbsp;&nbsp;
							</td>
							<td align="left">
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="password" name="password" id="password" size="30" />
								<span id="passwordSpan"></span>
							</td>
						</tr>
						<tr>
							<td height="40px" align="center" colspan="2">
								<input type="submit" name="submit" value="登陸" />
								&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="reset" name="reset" value="重置" />
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</td>
						</tr>
					</table>
					<!--<p align="right"><a href="${CONTEXT}/memberRegister.jsp">免费注册</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
			-->
				</form>
				您还不是流浪书屋用户？<br>
				<a href="${CONTEXT_ROOT}/SysMemberServlet?method=preadd"><img border="0" src="images/register.jpg">
				</a>
			</div>
			<%@ include file="bottom.jsp"%>
		</center>
	</body>
</html>